<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<body>
    <div id="myExamsList">
        <div id="exam_filter">
            <div>
               <span>
                   <b>选择年份：</b>
                   <select id="student_exam_select_time" onchange="studentExam.selectYearExam()">
                        <option  th:each="year:${years}" th:value="${year}" th:text="${year}"></option>
                   </select>
               </span>
            </div>
        </div>
        <div id="exam_table">
            <table class="table table-hover">
                <thead>
                    <tr>
                        <th width="10%">序号</th>
                        <th width="50%">考试名称</th>
                        <th width="20%">考试时间</th>
                        <th width="20%">得分</th>
                    </tr>
                </thead>
                <tbody>
                    <th:block th:if="${currYearExams==null || currYearExams.size()==0}">
                        <tr>
                            <td colspan="6" align="center">没有考试成绩记录</td>
                        </tr>
                    </th:block>
                    <th:block th:if="${currYearExams!=null && currYearExams.size()!=0}">
                        <tr th:each="exam:${currYearExams}">
                            <td th:text="${examStat.index+1}"></td>
                            <td th:text="${exam.name}"></td>
                            <th:block th:if="${exam.duration!=null}">
                                <td th:text="${#dates.format(exam.create_time,'yyyy-MM-dd HH:mm:ss')}"></td>
                            </th:block>
                            <th:block th:if="${exam.duration==null}">
                                <td th:text="${#dates.format(exam.start_time,'yyyy-MM-dd HH:mm:ss')}"></td>
                            </th:block>
                            <td th:text="${exam.score==null?'缺考':exam.score}"></td>
                        </tr>
                    </th:block>
                </tbody>
            </table>
        </div>
    </div>
</body>
</html>